@extends('base')
@section('style')
    <style>
        .max-line3 {
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .max-line2 {
            text-overflow: ellipsis;
            display: -webkit-box!important;
            padding: 0 5% 0 5%!important;
            margin: 25px 0 25px 0;
            -webkit-line-clamp: 2;
            max-height: 50px;;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .actives{background: #660066;color: #fff!important;}
    </style>
@stop
@section('content')
    <div class="banner">
        <div class="ny_img">
            <img src="/images/ny_banner.jpg">
        </div>
    </div>
    <!--友情链接-->

    <div class="container1200">
        <p class="mt20">
            <a href="/news/index" class="btn-center {{"" === $type ? "cedao_hover" : ""}}">所有资讯</a>
            <a href="/news/index/0" class="btn-center {{"0" === $type ? "cedao_hover" : ""}}">园区新闻</a>
            <a href="/news/index/1" class="btn-center {{"1" === $type ? "cedao_hover" : ""}}">通知公告</a>
            <a href="/news/index/2" class="btn-center {{"2" === $type ? "cedao_hover" : ""}}">首页轮播</a>
        </p>
        <div class="newsList">
            <ul>
                @foreach($list as $item)
                    <li>
                        <a href="{{url('/news/detail/'.$item->id)}}">
                            <div class="newsThum">
                                <img src="{{asset("/img/".$item->type.'-'.json_decode($item->content)->pic.'/'.$items['data']['pic']['value'])}}"
                                     alt="{{$item->name}}">
                            </div>
                            <div class="newsNames max-line2">{{$item->name}}<br></div>
                            <div class="newsBorderPlus animate">
                                <img src="/images/newsPlusIcon.jpg" class="plusIcon animate"></div>
                            <div class="newsDetail max-line3" style="text-align:left;">{{$item->description}}</div>
                        </a>
                    </li>
                @endforeach
            </ul>

        </div>

        @if ($list->hasPages())
            <div class="list-page">
                {!! $list->render() !!}
            </div>
        @endif
    </div>
@stop